<?php
	header('Refresh: 10; URL=../auth.php');
		
	$con=mysqli_connect("localhost","root");

	if (mysqli_connect_errno())
	{
	  echo "Failed to connect to MySQL: " . mysqli_connect_error();
	}

	$location = 'private/warehause_db_schema.sql';
	$commands = file_get_contents($location);
	if($con->multi_query($commands)) {
		echo "ALIVE.";
		
		echo "<br/><br/><br/>";
		
		echo "You will be redirected to main page in 10 seconds.";
		
		echo "<br/><br/>";
		
		echo "For log in into WAREHAUSE please use credentials:";
		
		echo "<br/><br/>";
		
		echo "LOGIN		:	<b>admin</b>";
		echo "<br/>";
		echo "PASSWORD	:	<b>admin</b>";
	} else {
		echo "Failed to execute SQL query";
		
		if($mysqli->errno) 
			die($mysqli->error);
	}
?>